.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(31, 41, 55, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px 12px 0 0;
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.filter-tab {
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.filter-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.filter-tab.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(147, 51, 234, 0.5));
  color: white;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

@keyframes aiPulse {
  0% {
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.5);
  }
  100% {
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.3);
  }
}

.filter-tab.ai {
  font-size: 15px;
  font-weight: 600;
  padding: 7px 20px;
  background: linear-gradient(135deg, rgba(94, 63, 179, 0.3), rgba(76, 29, 149, 0.3));
  border: 1px solid rgba(167, 139, 250, 0.3);
  animation: aiPulse 3s infinite ease-in-out;
  min-width: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.filter-tab.ai::before {
  content: ""; 
  margin-right: 2px;
}

.filter-tab.ai:hover {
  background: linear-gradient(135deg, rgba(94, 63, 179, 0.4), rgba(76, 29, 149, 0.4));
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.4);
}

.filter-tab.ai.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.8), rgba(76, 29, 149, 0.8));
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
  border: 1px solid rgba(167, 139, 250, 0.6);
}

.close-button {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Mobile styles */
@media (max-width: 768px) {
  .chat-header {
    padding: 10px 12px;
  }

  .filter-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .filter-tab.ai {
    font-size: 13px;
    padding: 6px 14px;
    min-width: 100px;
  }
}

@keyframes badgePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.player-messages-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  animation: badgePulse 2s infinite ease-in-out;
  z-index: 10;
}

.player-messages-badge:empty {
  display: none;
}

.player-messages-badge:not(:empty) {
  display: flex;
} 